﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Xuanren_FrontEnd.Model;

namespace Xuanren_FrontEnd.Controllers
{
    public class SharedController : Controller
    {
        private XuanrenTherapyEntities db = new XuanrenTherapyEntities();
        // GET: Layout
        public ActionResult Header()
        {
            //新闻分类
            ViewBag.ArticleTypeList=db.NewsType.Where(x => true);
            //商品分类
            ViewBag.ProductTypeList=db.Category.Where(x => true);
            //轮播图片
            ViewBag.BannerList=db.Banner.Where(x => true);
            return View();
        }

        public ActionResult Footer()
        {
            return View();
        }

        public ActionResult NavigationBar()
        {
            About about=db.About.SingleOrDefault();
            return View(about);
        }
    }
}